package com.dashboard.cloud.feign.client;

import com.dashboard.cloud.common.dto.UserDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * All rights Reserved, Designed By www.super-master.com
 *
 * @ProjectName: spring-cloud-dashboard
 * @Package: com.dashboard.cloud.provider.client
 * @ClassName: RemoteServerFeign
 * @Description: []
 * <p> </p>
 * @Author: [Lance Ting]
 * @Date: 2024/11/15 14:27
 * @Version: V1.0
 * @Copyright: 2024 www.super-master.com Inc. All rights reserved.
 * TODO: 注意,本文件Lance Ting所作,如果转载或使用请标明具体出处!
 **/
@FeignClient(name = "nacos-service-provider") // 指定要调用的微服务名称
public interface RemoteServerFeign {

    // 指定远程服务的URL路径
    @GetMapping("/remote/sever/user/{userId}")
    UserDTO queryUserByPrimary(@PathVariable("userId") Long userId); // 定义要调用的远程方法
}